<?
/**
* Copyright (c) 2002-2007 BioWare Corp.
* http://www.bigdaddymonitor.org
*
* This file is part of the BigDaddy Monitoring
* program. It is free software distributed under
* the terms of the BSD License. It is ditributed
* in the hopes that it will be useful, but
* WITHOUT ANY WARRANTY; without event the implied
* warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE.
*
* The BSD License is available from:
* http://www.opensource.org/licenses/bsd-license.php
**/
$aIncidents = $BigDaddyData->GetIncidents();
?>

<table border="0" cellpadding="3" cellspacing="0" class="incident" width="98%">
<thead>
<th>ID</th>
<th>Incident</th>
<th>Start</th>
<th>End</th>
<th>Posted</th>
</thead>

<?
if (!is_array($aIncidents))
{
	?>
	<tr><td colspan="3" align="center"><b>There are no incidents in the database</b></td></tr>
	<?
}
else
{
	foreach ($aIncidents as $aRow)
	{
		?>
		<tr>
		<td><?=$aRow["ID"];?></td>
		<td><a href="<?=$_SERVER["PHP_SELF"];?>?page=IncidentView&ID=<?=$aRow["ID"];?>"><?=$aRow["title"];?></a></td>
		<td><?=get_time_str($aRow["incidentStart"], 2);?></td>
		<td><?=get_time_str($aRow["incidentEnd"], 2);?></td>
		<td><?=$aRow["postedBy"];?> - <?=get_time_str($aRow["postedTime"], 2);?></td>
		</tr>
		<?
		
	}
}
?>
</table>
